Introduction

What is DataObjects.Net?

DataObjects.Net is a rapid database application development framework. It combines business logic layer (BLL) development library, object-relational mapper (ORM) and a set of storage providers allowing the same BLL code to work transparently on any of them.

Most frictionless environment you can find

DataObjects.Net helps you to model complex domains with ease. It supports the development path you used to follow. We put a lot of efforts to allow you thinking of persistent objects as of regular .NET objects. DataObjects.Net relies on “Model-First” (or “Code-First”) concept pushing developers to focus on domain model and its business logic instead of caring about how and when the entities must be persisted. This allows you to design models using just usual .NET classes. Moreover, we eliminated the need to maintain separate XML mapping files.

So building complex models containing hundreds of persistent types is nearly as simple as doing the same for non-persistent models.

Database schema: generation and evolution

DataObjects.Net provides built-in version-to-version migration pattern for your applications. It automatically creates, and, if necessary, upgrades the schema on each Domain startup preserving all the data. The upgrade process is fully customizable.

Perfect LINQ implementation

DataObjects.Net has a full-featured LINQ-to-SQL translator with support for multiple SQL dialects. It is, likely, the first ORM designed to compile LINQ queries not just to SQL, but to generally any other query language. Its internal query representation is similar to query plan used in SQL databases instead of AST. This feature allows it to perform really complex query transformations while producing query for target database. Currently DataObjects.Net supports:

  • Microsoft SQL Server 2005 / 2008 / 2012 (including Express editions)
  • Microsoft SQL Server CE 3.5
  • Windows Azure SQL Database
  • Oracle Database 10g and 11g (including Express editions)
  • PostgreSQL 8.3, 8.4, 9.0 and 9.1
  • Firebird 2.5
  • MySQL 5.1 and 5.5
  • SQLite 3

DataObjects.Net allows to transparently migrate between any of storages it supports.

High performance

DataObjects.Net provides various performance features:

  • DataObjects.Net supports so-called generalized batching. This means it almost never sends separate queries; instead, it joins the queries it produces in batches and sends them only when a result of some of these queries is necessary in your application. Of course, this is a rough description, but it explains what really happens there.
  • Future queries allows generalized batching to work almost ideally. DataObjects.Net batches future queries and CUD statements (insertions, updates and deletions) together.
  • Finally, there is prefetch API allowing to fetch arbitrary graphs of objects in few roundtrips.

System requirements

To install DataObjects.Net you need to have the following components:

  • Operating system: Windows Server 2008, Windows 7, Windows 8 with .NET Framework 3.5 SP1.
  • Development environment: optional; Visual Studio 2010 / 2012 (including Express editions) or SharpDevelop.
  • Database server: optional; Any supported, SQL Server is recommended.

Note

Applications based on DataObjects.Net require just .NET Framework 3.5 SP1 or higher to be installed.

Supported programming languages

DataObjects.Net supports modern CLR-based languages:

  • C# (preferred, all examples in this manual are in C#)
  • Visual Basic.NET
  • F#

DataObjects.Net Distribution

DataObjects.Net is distributed in several ways: installer, .zip package and as set of NuGet packages.

Installer

The most simple way of getting DataObjects.Net is using automated installer. It brings all libraries and tools you need to start developing with DataObjects.Net. Latest versions are available at downloads section of its website.

Major versions of DataObjects.Net could be installed side-by-side on the same development machine.

Note

For example, 4.5 and 4.6 are different major versions, but 4.6.0 and 4.6.1 are not.

.zip package

As alternative to the installer DataObjects.Net can be downloaded as .zip package. The package contains the same libraries and tools as the installer except Visual Studio project templates.

NuGet

Each release of DataObjects.Net is also available as set of NuGet packages. Unlike installer and .zip packages, ORM core libraries, database providers and extensions are distributed as separate NuGet packages.

Core package

DataObjects.Net package includes core libraries and services as well as support for MS SQL Server and Windows Azure.

Database provider packages

  • DataObjects.Net provider for Firebird.
  • DataObjects.Net provider for MySQL.
  • DataObjects.Net provider for MS SQL Server CE 3.5.
  • DataObjects.Net provider for PostgreSQL.
  • DataObjects.Net provider for SQLite.
  • DataObjects.Net provider for Oracle. It requires Oracle Data Provider for .NET (ODP.NET) to be installed.

Extension packages

  • Bulk operations extension.
  • Localization extension.
  • Security extension.
  • Operation reprocessing extension.
  • ASP.NET support extension.
  • Logging provider for log4net.
  • Change tracking extension.

Note

For all list of packages see Xtensive’s profile at NuGet gallery.

Package contents

DataObjects.Net distribution consists of the following components:

  • Lib directory contains run-time libraries that are required for building and running DataObjects.Net-based applications. It has two subdirectories that contain binaries for .NET Framework 3.5 and 4.0 respectively.
  • Tools directory contains build-time components that are required for building DataObjects.Net-based applications.